// 子组件 article.vue
<template>
  <div>
    <Input v-model="value" placeholder="我是子组件中的值" style="width: 300px" />
    <Divider />
    <br />
    <Input v-model="slef" placeholder="我要把自己传递给父组件" style="width: 300px" />
    <br />
    <Button type="primary" @click="pushToParent" style="margin-top:8px">传送！</Button>
  </div>
</template>
 
<script>
export default {
  props: {
    value: String
  },
  data() {
    return {
      slef: ""
    };
  },
  methods: {
    pushToParent() {
      this.$emit("pushToParent", this.slef);
    }
  }
};
</script>